export default [
  {
    path: '/usedComponents',
    name: 'usedComponents',
    redirect: '/usedComponents/proTablePart',
    meta: { title: '菜单文本.组件示例', icon: 'setting' },
    menu: true,
    children: [
      {
        path: '/usedComponents/proTablePart',
        name: 'proTablePart',
        component: () => import('@/views/usedComponents/proTablePart.vue'), // 路由懒加载
        meta: {
          keepAlive: true,
          title: '菜单文本.表格组件',
          breadcrumb: [
            { title: '菜单文本.组件示例', name: 'usedComponents' },
            { title: '菜单文本.表格组件', name: 'proTablePart' },
          ],
        },
        menu: true,
      },
      {
        path: '/usedComponents/piFormPart',
        name: 'piFormPart',
        component: () => import('@/views/usedComponents/piFormPart.vue'), // 路由懒加载
        meta: {
          keepAlive: true,
          title: '菜单文本.表单组件',
          breadcrumb: [
            { title: '菜单文本.组件示例', name: 'usedComponents' },
            { title: '菜单文本.表单组件', name: 'proTablePart' },
          ],
        },
        menu: true,
      },
      {
        path: '/usedComponents/piTreePart',
        name: 'piTreePart',
        component: () => import('@/views/usedComponents/piTreePart.vue'), // 路由懒加载
        meta: {
          keepAlive: true,
          title: '菜单文本.树形控件',
          breadcrumb: [
            { title: '菜单文本.组件示例', name: 'usedComponents' },
            { title: '菜单文本.树形控件', name: 'piTreePart' },
          ],
        },
        menu: true,
      },
    ],
  },
  {
    path: '/other',
    name: 'other',
    redirect: '/other/demo',
    meta: { title: '菜单文本.其他', icon: 'star', keepAlive: true },
    menu: true,
    children: [
      {
        path: '/other/demo',
        name: 'demo',
        component: () => import('@/views/other/demo.vue'), // 路由懒加载
        meta: {
          keepAlive: true,
          title: '菜单文本.演示',
          icon: 'document',
          // roles: ['user'], //roles的值代表哪些角色可以进入此路由
          breadcrumb: [
            { title: '菜单文本.其他', name: 'other' },
            { title: '菜单文本.演示', name: 'demo' },
          ],
        },
        menu: true,
        // 单独的前置路由守卫
        beforeEnter: (to, from) => {
          document.title = '欢迎学习vue3';
        },
      },
      {
        path: '/other/directive',
        name: 'directive',
        component: () => import('@/views/other/directive.vue'), // 路由懒加载
        meta: {
          title: '菜单文本.自定义指令',
          breadcrumb: [
            { title: '菜单文本.其他', name: 'other' },
            { title: '菜单文本.自定义指令', name: 'directive' },
          ],
        },
        menu: true,
      },
      {
        path: '/other/detail/:id',
        name: 'detail',
        component: () => import('@/views/other/detail.vue'), // 路由懒加载
        meta: {
          title: '菜单文本.详情页',
          breadcrumb: [
            { title: '菜单文本.其他', name: 'other' },
            { title: '菜单文本.详情页', name: 'detail' },
          ],
        },
        menu: true,
      },
      {
        path: '/other/projectWatch',
        name: 'projectWatch',
        component: () => import('@/views/other/projectWatch.vue'), // 路由懒加载
        meta: {
          title: '蓝思报表',
          breadcrumb: [
            { title: '菜单文本.其他', name: 'other' },
            { title: '蓝思报表', name: 'projectWatch' },
          ],
        },
        menu: true,
      },
    ],
  },
];
